﻿using CodeSpirit.Core.DependencyInjection;
using CodeSpirit.IdentityApi.Data.Models;

namespace CodeSpirit.IdentityApi.Repositories
{
    public interface ILoginLogRepository: IScopedDependency
    {
        Task<(List<LoginLog> Items, int Total)> GetPagedLoginLogsAsync(
            string keywords,
            string userName,
            bool? isSuccess,
            int page,
            int perPage);

        Task<LoginLog> GetByIdAsync(int id);
        Task AddLoginLogAsync(LoginLog loginLog);
        Task<List<LoginLog>> GetLoginLogsByUserIdAsync(long userId, int take = 10);
        Task<List<LoginLog>> GetAllLoginLogsAsync(int take = 10);
    }
}